package com.sdutcm.xuake.xuanke_demo.service;

import com.sdutcm.xuake.xuanke_demo.bean.Course;
import com.sdutcm.xuake.xuanke_demo.dao.CourseDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 *
 * @author 小浩
 * @date 2018-09-20 01:34
 * @package com.sdutcm.xuake.xuanke_demo.service
 * @description
 */

@Service
public class CourseService {
    @Autowired
    CourseDao courseDao;
    public Course findCourseByName(String name){
        return courseDao.findByCousreName(name);
    }
    public List<Course> findAllCourse(){
        return courseDao.findAll();
    }
}
